package net.lab1024.sa.admin.module.business.supercomputer.datatask.dao;

import java.time.LocalDateTime;
import java.util.List;
import net.lab1024.sa.admin.module.business.supercomputer.datatask.domain.entity.DatataskEntity;
import net.lab1024.sa.admin.module.business.supercomputer.datatask.domain.form.DatataskQueryForm;
import net.lab1024.sa.admin.module.business.supercomputer.datatask.domain.vo.DatataskVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import net.lab1024.sa.admin.module.business.supercomputer.datatask.domain.vo.StatusVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

/**
 * 任务配置 Dao
 *
 * @Author KeissCake
 * @Date 2024-09-26 21:17:52
 * @Copyright 暂无
 */

@Mapper
@Component
public interface DatataskDao extends BaseMapper<DatataskEntity> {

    /**
     * 分页 查询
     *
     * @param page
     * @param queryForm
     * @return
     */
    List<DatataskVO> queryPage(Page page, @Param("queryForm") DatataskQueryForm queryForm);

    void updateStatusById(@Param("taskId") Integer taskId,@Param("status") Integer status,@Param("updateUser") String updateUser);
    //更新操作时间
    void updateTime(@Param("taskId") Integer taskId, @Param("nowTime") LocalDateTime nowTime);

    StatusVO queryStatus(@Param("taskId") Integer taskId);

    void addTask(@Param("datataskEntity") DatataskEntity datataskEntity);
}
